<link rel="stylesheet" type="text/css" href="$!{rc.contextPath}/css/bootstrap/css/bootstrap.css">
<script type="text/javascript" src="$!{rc.contextPath}/css/bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="$!{rc.contextPath}/pages/templates/login_bg/login.css">

<div class="container">
    <div class="row center-vertical">
        <div class="col-md-offset-3 col-md-6">
            <form class="form-horizontal" action="login" method="post">
                <span class="heading">用户登录</span>
                <div class="form-group">
                    <input type="text" class="form-control" id="inputEmail3" placeholder="用户名" name="username">
                    <i class="fa fa-user"></i>
                </div>
                <div class="form-group help">
                    <input type="password" class="form-control" id="inputPassword3" placeholder="密　码" name="password">
                    <i class="fa fa-lock"></i>
                    <a href="#" class="fa fa-question-circle"></a>
                </div>
                <div class="form-group help">
                	<div class="col-md-9" style="margin-left:-15px">
                    	<input type="text" class="form-control" id="inputverifyCode" placeholder="验证码" name="verifyCode" >
                    </div>
                    <div class="col-md-3" style="margin-top:3px">
                    	<img id="verifyCodeImage" onclick="reloadVerifyCode()" src="$!{rc.contextPath}/getVerifyCodeImage" style="cursor: pointer"/>
                    </div>
                    <i class="fa fa-lock"></i>
                    <a href="#" class="fa fa-question-circle"></a>
                </div>
                <div class="form-group">
                    <div class="main-checkbox">
                        <input type="checkbox" value="None" id="checkbox1" name="check"/>
                        <label for="checkbox1"></label>
                    </div>
                    <span class="text">记住我</span>
                    <button type="submit" class="btn btn-default">登录</button>
                    <button type="button" class="btn_regist">注册</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
function reloadVerifyCode(){  
    document.getElementById('verifyCodeImage').setAttribute('src', '$!{rc.contextPath}/getVerifyCodeImage?id='+Math.random());  
}
$('.btn_regist').click(function(){
	window.location.href="add"
});
$('#checkbox1').click(function(){
	var checked = $('#checkbox1').is(':checked');
	if(checked){
		$('#checkbox1').val('0');
	}else{
		$('#checkbox1').val('1');
	}
});
</script>